package com.quydat.forum.interfaces;
import javax.ejb.Local;

import com.quydat.forum.entites.UserEntity;
/**
 * 
 * @author Dat
 * The local Interface for UserEntityManage
 */
@Local
public interface UserEntityManageLocal {
	/**
	 * add new UserEntity
	 * @param user UserEntity
	 */
	void addUserEntity(UserEntity user);
	/**
	 * delete UserEntity, his id is id
	 * @param id id of UserEntity which is going to be deleted
	 */
	void deleteUserEntity(long id);
	/**
	 * update UserEntity his Id is id, with new UserEntity
	 * @param id : Id of UserEntity which will be updated
	 * @param update : new UserEntity 
	 * @return : updated UserEntity
	 */
	UserEntity updateUserEntity(long id,UserEntity update);
	/**
	 * find UserEntity, his id is id
	 * @param id
	 * @return UserEntity
	 */
	UserEntity findUserbyId(long id);
	/**
	 * get UserEntity which hat :loginName and :password
	 * @param loginName
	 * @param password
	 * @return userEntity
	 */
	UserEntity getUserWithLoginNamePasword(String loginName, String password);

}
